package com.neusoft.elmboot.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.neusoft.elmboot.po.Food;
import com.neusoft.elmboot.service.FoodService;
import com.neusoft.elmboot.util.APIResponse;

@RestController
@RequestMapping("/Food")
public class FoodController {

	@Autowired
	private FoodService foodService;

	// @GetMapping("/list")
	// public APIResponse listFoodByBusinessId(Integer businessId,Integer classifyId) throws Exception {
	// 	return APIResponse.success(foodService.listFoodByBusinessId(businessId,classifyId));
	// }

	@GetMapping("/list")
	public APIResponse listFoodByBusinessIdAndUserId(Integer businessId,String userId){
		return foodService.listFoodByBusinessIdAndUserId(businessId,userId);
	}
}